﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Kingsoft MogileFS Files Manage System--添加 Tracker</title>
<link href="../site_media/css.css" rel="stylesheet" type="text/css" />
</head>
<body>
<map name="Map" id="Map"><area shape="rect" coords="2,3,318,59" href="../index" target="_self" alt="首页" />
</map>
<table style="width: 100%; height: 60px">
    <tr>
      <td width="320"> 
        <img src="../site_media/logo.png" width="320" height="60" border="0" usemap="#Map" />        
      </td>
        <td valign="baseline">
          <ul id="nav"> 
               <li><a href="../logout/" >退出</a></li>
               <li><a href="../admin_mgr/" >管理选项</a></li>    
               <li><a href="../addtracker/" id="current">Tracker管理</a></li> 
               <li><a href="../addmogilefs/" >添加组群</a></li> 
               <li><a href="../index" >首 页</a></li> 
        </ul> 
       </td>
     </tr>
</table>
  <div align="center"><br>
    <table width="85%" border="0" cellpadding="2" cellspacing="2" class="index_table">
      <tr>
        <td width="28%" class="info_tile"> IP</td>
        <td width="28%" class="info_tile">端口</td>
        <td width="17%" class="info_tile">所属组群</td>
        <td width="14%" class="info_tile">操作</td>
      </tr>
      {% for info in allTrackers %}
      <tr>
        <td class="info_td">{{ info.2 }}</td>
        <td class="info_td">{{ info.3 }}</td>
        <td class="info_td">{{ info.1 }}</td>
        <td class="info_td"><a href="../deltracker/?trackerID={{ info.0}}"  onClick="javascript:return confirm('确定要删除吗？')">删除</a></td>
      </tr>
      {% endfor %}
    </table>
    <br>
    <form id="form1" name="form1" method="post" action="">
	<table width="85%" border="0" cellpadding="2" cellspacing="2" class="index_table">
  <tr>
    <td colspan="2" class="title">添加 Tracker</td>
    </tr>
  <tr>
    <td width="41%" class="index_td1">IP：</td>
    <td width="59%" class="index_td2">
      <label>
        <input type="text" name="trackerIP" id="trackerIP" />
        </label>    </td>
  </tr>
  <tr>
    <td class="index_td1">IP端口：</td>
    <td class="index_td2">
      <label>
        <input type="text" name="trackerPort" id="trackerPort" />
        </label>    </td>
  </tr>
  <tr>
    <td class="index_td1">组群：</td>
    <td class="index_td2">
      <label>
        <select name="mogGroup" id="mogGroup">
	  {% for mogs in mogGroups %}
          <option value={{ mogs.0 }}>{{ mogs.1 }}</option>
          {% endfor %}
        </select>
        </label>    </td>
  </tr>
  <tr>
    <td class="index_td1">&nbsp;</td>
    <td class="index_td2">&nbsp;</td>
  </tr>
  <tr>
    <td colspan="2" class="index_table"><label>
      <input type="submit" name="button" id="button" value="提交" />
    </label>&nbsp;&nbsp;&nbsp;&nbsp;
      <label>
      <input type="reset" name="button2" id="button2" value="重置" />
      </label></td>
    </tr>

</table>
   {% if WrongIP %}
      <font color="red"><b>IP错误</b></font>
   {% endif %}
   {% if WrongPort %}
      <font color="red"><b>端口错误</b></font>
   {% endif %}
   {% if AddOk %}
      <font color="red"><b>添加成功</b></font>
   {% endif %}
   </form>
</div>
</body>
</html>
